	$(document).ready(function(){
		var page = 1;
		var i = 4;
		var $ul = $(".slide-block ul");
		var $ul_width = $(".slide-block").width();
		var $length = $(".slide-block ul li").length;
		var $page_count = Math.ceil($length / i);
		$(".prev").click(function(){
			if(!$ul.is(":animated")){
			if(page == $page_count){
			$ul.animate({left:'0px'},"slow");
			page = 1;
			}else{
			$ul.animate({left:'-=' + $ul_width},"slow");
			page++;
			}
			
			}
		})
		
		$(".next").click(function(){
			if(!$ul.is(":animated")){
			if(page==1){
			   $ul.animate({left:'-='+$ul_width*($page_count-1)},"slow");
			page = $page_count;
			}else{
			$ul.animate({left:'+=' + $ul_width},"slow");
			page--;
			}
			   }
		
		})
		
	});
	